package String.Builder;
/*public String toString(): 通过 toString() 将String.Builder转换为String.

public StringBuilder(String s): 通过构造方法 将String转换为String.Builder.*/


public class StringBuilder与String的相互转换 {
    public static void main(String[] args) {
        StringBuilder sb=new StringBuilder();
        sb.append("hello");
        //public String toString(): 通过 toString() 将String.Builder转换为String
        String s= sb.toString();
        System.out.println(s);
        //public StringBuilder(String s): 通过构造方法 将String转换为String.Builder
        String s2="hello";
        StringBuilder sb1=new StringBuilder(s);
        System.out.println(sb1);

    }
}
